package com.tao.to;

import java.io.Serializable;
import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;

import org.hibernate.mapping.IdGenerator;


import com.tao.base.BaseEntity;

@Entity
@Table(name="k_article")
public class KArticleTO  extends BaseEntity implements Serializable{
	
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="ARTICLE_ID", nullable=false)
	@GeneratedValue(strategy=GenerationType.AUTO)  
	private long articleId;
	
	//bi-directional many-to-one association to KCategory
	@ManyToOne
	@JoinColumn(name="CATEGORY_ID", nullable=false)
	private KCategoryTO category;
	
	@Column(name="ARTICLE_TITLE", length=255)
	private String articleTitle;
	
	@Lob
	@Column(name="ARTICLE_KEYWORDS")
	private String articleKeywords;
	
	@Lob
	@Column(name="ARTICLE_CONTENT")
	private String articleContent;
	
	@Column(name="ARTICLE_SRC", length=50)
	private String articleSrc;
	

	public long getArticleId() {
		return articleId;
	}

	public void setArticleId(long articleId) {
		this.articleId = articleId;
	}

	public KCategoryTO getCategory() {
		return category;
	}

	public void setCategory(KCategoryTO category) {
		this.category = category;
	}

	public String getArticleTitle() {
		return articleTitle;
	}

	public void setArticleTitle(String articleTitle) {
		this.articleTitle = articleTitle;
	}

	public String getArticleKeywords() {
		return articleKeywords;
	}

	public void setArticleKeywords(String articleKeywords) {
		this.articleKeywords = articleKeywords;
	}

	public String getArticleContent() {
		return articleContent;
	}

	public void setArticleContent(String articleContent) {
		this.articleContent = articleContent;
	}

	public String getArticleSrc() {
		return articleSrc;
	}

	public void setArticleSrc(String articleSrc) {
		this.articleSrc = articleSrc;
	}
	

}
